package com.doit.day01

import org.apache.spark.{SparkConf, SparkContext}

/**
 * @Author:
 * @WX: 17710299606
 * @Tips: 学大数据 ,到多易教育
 * @DOC: https://blog.csdn.net/qq_37933018?spm=1000.2115.3001.5343
 * @Description:
 */
object Demo07Function02 {
  def main(args: Array[String]): Unit = {

    val conf = new SparkConf()
      .setMaster("local[*]")
      .setAppName(this.getClass.getSimpleName)
    val sc = SparkContext.getOrCreate(conf)


    val rdd = sc.makeRDD(List("hello  jim  jim  cat","ahello  jim  jim  cat","hello  jim  jim  cat") , 2)


   // rdd.map(line=>line.toUpperCase()).foreach(println)

   // rdd.flatMap(_.split("\\s+")).foreach(println)

    rdd.filter(_.startsWith("h"))


    //  sc.stop()

  }

}
